package ng.map.elements.objects;

import java.io.IOException;

import ng.graphics.Animation;
import ng.graphics.FrameBuffer;
import ng.lib.Vector2D;
import ng.map.MapObject;
import ng.map.MapObjectDynamic;
import ng.map.MapObjectStatic;
import ng.map.collision.CollisionBound;
import ng.map.collision.CollisionCircle;
import ng.map.collision.CollisionRectangle;
import ng.map.gravitation.GravitationElementDynamic;
import ng.map.gravitation.GravitationElementStatic;

public class BlackHole extends MapObjectStatic implements GravitationElementStatic {
	private static FrameBuffer frames;
	private static CollisionBound collisionBoundHolder = new CollisionCircle(new Vector2D(0,0),50);
	static {
		try {
			frames = new FrameBuffer(new String[]{"data/textures/blackhole/hole1.png"});
		} catch (IOException e) {
			System.err.println("An image isn't at the right place");
			e.printStackTrace();
		}
	}

	public BlackHole(Vector2D p) {
		super(collisionBoundHolder);
		this.animation = new Animation(frames, 1);
		this.position = p;
		this.mass = 60000;
		this.center.x = 50;
		this.center.y = 50;
	}
}
